package org.jeecg.modules.friends.service.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 * Description:
 *
 * @author
 * @Date Create on 2018/10/12
 * @since version1.0
 */
@Data
@Slf4j
@ApiModel(value = "分页参数")
public class BasePageReq  {

    protected final static Integer MAX_PAGE_SIZE = 10000;
    @ApiModelProperty(value = "页码", required = true)
    int pageNo;
    @ApiModelProperty(value = "页大小", required = true)
    int pageSize;

    {
        pageSize = 10000;
        pageNo = 1;
    }

    public int limitStartPage() {
        return this.pageSize * (this.pageNo - 1);
    }

    public int limitEndPage() {
        return pageSize;
    }
}
